package com.cloud.drore.eboss.supplier.mapper;

import com.cloud.drore.eboos.common.base.MyMapper;
import com.cloud.drore.eboos.common.entity.supplier.TicketPrice;
import com.cloud.drore.eboss.supplier.mapper.provider.TicketPriceProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;

/**
 * 浙江卓锐科技股份有限公司 版权所有  Copyright 2018<br>
 *
 * @Description: <br>
 * @Project: eboos <br>
 * @CreateDate: Created in 2018/1/11 13:53 <br>
 * @Author: <a href="575842778@qq.com">郑永涛</a>
 */
public interface TicketPriceMapper extends MyMapper<TicketPrice> {

    @Select("select * from eboos_ticket_price")
    List<TicketPrice> query();

    @Select("select purchase_price_usually,retail_price_usually,suggested_retail_price_usually from eboos_ticket_price where ticket_id = '${ticketId}' ")
    TicketPrice selectByTicketId(Long ticketId);

    @UpdateProvider(type = TicketPriceProvider.class, method = "updateTicketPriceByTicketId")
    int updateTicketPriceByTicketId(TicketPrice parms);

    @SelectProvider(type = TicketPriceProvider.class, method = "selectByParam")
    TicketPrice selectByParam(TicketPrice price);

}